/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   NewChangeInvest.java for com.pengtu.gsj.entity.jh    </p>
 * 
 * <p>最后修改 : $: 2017年6月28日-下午3:56:08 v 1.0.0	 win7   $ </p>
 * 
*/

package com.pengtu.gsj.entity.jhgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * NewChangeInvest
 * 
 * 2017年6月28日 下午3:56:08
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_JH_NEWCHANGEINVEST")
public class NewChangeInvest  extends IdEntity{

	
	private static final long serialVersionUID = 8090799672276957429L;

	private String year;				//年份
	private Double planInvest;			//计划投资
	private Double completeInvest;		//完成投资
	private Double investPate;			//完成比例P
	private Integer slowNum;			//被通报进程缓慢项目数N
	private String remark;				//备注
	
	
	private Double yearMark;            //年度得分，只用于导出
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	@Column(name = "YEAR")
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	@Column(name = "PLANINVEST")
	public Double getPlanInvest() {
		return planInvest;
	}
	public void setPlanInvest(Double planInvest) {
		this.planInvest = planInvest;
	}
	@Column(name = "COMPLETEINVEST")
	public Double getCompleteInvest() {
		return completeInvest;
	}
	public void setCompleteInvest(Double completeInvest) {
		this.completeInvest = completeInvest;
	}
	@Column(name = "INVESTPATE")
	public Double getInvestPate() {
		return investPate;
	}
	public void setInvestPate(Double investPate) {
		this.investPate = investPate;
	}
	@Column(name = "SLOWNUM")
	public Integer getSlowNum() {
		return slowNum;
	}
	public void setSlowNum(Integer slowNum) {
		this.slowNum = slowNum;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
	@Transient
	public Double getYearMark() {
		return yearMark;
	}
	public void setYearMark(Double yearMark) {
		this.yearMark = yearMark;
	}
	
	
	
}
